package cn.doitedu.demo7;

import org.roaringbitmap.longlong.Roaring64Bitmap;
import redis.clients.jedis.Jedis;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class SomeThing implements Serializable {

    //private Jedis jedis = new Jedis("doitedu",6379);

    Roaring64Bitmap bitmap = Roaring64Bitmap.bitmapOf(1,2,4);
    String name;

    public SomeThing(String name){
        this.name = name;
    }

    public void doSomething() {
        System.out.println(bitmap.toString());
    }

    public static void main(String[] args) throws IOException {

        SomeThing someThing = new SomeThing("doitedu");


        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream oo = new ObjectOutputStream(bout);

        oo.writeObject(someThing);


        System.out.println(bout.toByteArray().length);

    }

}
